// 引入dom
const dom = require("./dom.js")

// 公共底部导航
module.exports = {
    tabbar (fliename) {
        let html = `
            <a href="index.html" class="${fliename === "index" ? "active" : ""}">
                <i class="iconfont icon-shouye"></i>
                首页
            </a>
            <a href="exercising_run.html" class="${fliename === "exercising_run" ? "active" : "" || fliename === "exercising_riding" ? "active" : "" || fliename === "exercising_course" ? "active" : "" }">
                <i class="iconfont icon-xintiao"></i>
                运动
            </a>
            <a href="circle.html" class="${fliename === "circle" ? "active" : ""}">
                <i class="iconfont icon-tubiaozhizuomoban_quanzi"></i>
                圈子
            </a>
            <a href="mine.html" class="${fliename === "mine" ? "active" : ""}">
                <i class="iconfont icon-wode"></i>
                我的
            </a>
        `;
        dom.get(".tabbar").innerHTML = html;
    }
}